package dao;

import java.util.List;

import org.hibernate.Session;

import modele.Articlestock;


import persistence.BaseDAO;

public class ArticlestockDAO{
	
	public static void ajouterArticlestock(Articlestock articlestock, Session session) throws Exception{
		BaseDAO.getInstance().ajouter(articlestock,session);
	}

	public static void modifierArticlestock(Articlestock articlestock, Session session) {
		BaseDAO.getInstance().modifier(articlestock,session);
	}

	public static void SupprimerArticlestock(Articlestock articlestock, Session session) {
		BaseDAO.getInstance().delete(articlestock,session);
	}

	public static Articlestock getArticlestock(int id, Session session) {
		return (Articlestock) BaseDAO.getInstance().getObject(Articlestock.class, id,session);
	}

	public static List getListeArticlestock(String requette, Session session) {
		return BaseDAO.getInstance().getListObject(requette,session);
	}
}
